<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户冻结页面</title>
</head>
<body>
<table border="1" align="center" width="600" cellpadding="3">
    <tr align="center" bgcolor="#00FFF">
        <td th:align="center">用户名</td>
        <td th:align="center">用户状态</td>
        <td th:align="center">操作</td>
    </tr>
    <tr th:each="user:${userBeans}">
        <td th:align="center" th:text="${user.getUserName()}"></td>
        <td th:align="center" >
            <div th:if="${user.getState()==0}">未冻结状态</div>
            <div th:if="${user.getState()==1}">冻结状态</div>
        </td>
        <td th:align="center" >
            <a th:href="@{/user/doFreezeUser/0/{userName}(userName=${user.getUserName()})}" th:if="${user.getState()==1}" th:text="解冻">解冻</a>
            <a th:href="@{/user/doFreezeUser/1/{userName}(userName=${user.getUserName()})}" th:if="${user.getState()==0}" th:text="冻结">冻结</a>

            <input type="hidden" name="userName" th:value="${user.getUserName()}">

        </td>
    </tr>
</table>
<input type="button" th:value="返回用户页面" onclick="window.location='/user/index'">
</body>
</html>